//package com.plian.system.controller.fr.internalauditmanagement;
//
//import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
//import com.baomidou.mybatisplus.core.metadata.IPage;
//import com.plian.Tools.Func;
//import com.plian.Tools.StringPool;
//import com.plian.Tools.base.BaseController;
//import com.plian.system.config.Resubmit;
//import com.plian.system.dto.fr.internalauditmanagement.IamAuditRectifyDTO;
//import com.plian.system.entity.fr.internalauditmanagement.IamAuditRectify;
//import com.plian.system.model.CommonCode;
//import com.plian.system.model.ListResult;
//import com.plian.system.model.R;
//import com.plian.system.mybatis.search.SearchEntity;
//import com.plian.system.mybatis.search.SearchParamEntiy;
//import com.plian.system.mybatis.search.TokenSearch;
//import com.plian.system.mybatis.support.Condition;
//import com.plian.system.mybatis.support.Query;
//import com.plian.system.service.fr.internalauditmanagement.IamAuditRectifyService;
//import com.plian.system.vo.fr.internalauditmanagement.IamAuditRectifyVO;
//import com.plian.system.wrapper.fr.internalauditmanagement.IamAuditRectifyWrapper;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import io.swagger.annotations.ApiResponse;
//import io.swagger.annotations.ApiResponses;
//import lombok.AllArgsConstructor;
//import lombok.extern.slf4j.Slf4j;
//import org.apache.commons.lang3.StringUtils;
//import org.springframework.transaction.annotation.Transactional;
//import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.RequestBody;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//
//import javax.validation.Valid;
//import java.util.List;
//
///**
// * 审计发现问题整改清单
// *
// * @author makejava
// * @since 2023-03-02 14:00:43
// */
//@Slf4j
//@RestController
//@AllArgsConstructor
//@RequestMapping("api/nsgl/iam_audit_rectify")
//@Api(value = "审计发现问题整改清单", tags = "审计发现问题整改清单")
//public class IamAuditRectifyController extends BaseController {
//
//    private final IamAuditRectifyService rectifyService;
//
//    private final IamAuditRectifyWrapper rectifyWrapper;
//
//    /**
//     * 新增或修改
//     */
//    @ApiOperation(value = "新增或修改", notes = "新增或修改")
//    @ApiResponses({
//            @ApiResponse(code = 200, message = "操作成功"),
//            @ApiResponse(code = 500, message = "服务器错误"),
//    })
//    @PostMapping("/submit")
//    @Resubmit(delaySeconds = 0)
//    public R submit(@Valid @RequestBody IamAuditRectifyVO vo) {
//        return R.status(rectifyService.submit(vo));
//
//    }
//
//    /**
//     * 查询详情
//     */
//    @ApiOperation(value = "查询详情", notes = "查询详情")
//    @ApiResponses({
//            @ApiResponse(code = 200, message = "操作成功"),
//            @ApiResponse(code = 500, message = "服务器错误"),
//    })
//    @PostMapping("/detail")
//    public R<IamAuditRectifyDTO> detail(@RequestBody IamAuditRectifyVO auditRectifyVO) {
//        return R.data(rectifyService.detail(auditRectifyVO));
//    }
//
//    /**
//     * 列表分页
//     */
//    @ApiOperation(value = "列表分页", notes = "列表分页")
//    @ApiResponses({
//            @ApiResponse(code = 200, message = "操作成功"),
//            @ApiResponse(code = 500, message = "服务器错误"),
//    })
//    @PostMapping("/list")
//    public ListResult<IamAuditRectifyVO> list(@RequestBody Query query) {
//        List<SearchEntity> entityList = query.getSearch();
//        if (query.getAscs() == null && query.getDescs() == null) {
//            query.setDescs("create_time");
//        }
//        QueryWrapper<IamAuditRectify> queryWrapper = SearchParamEntiy.getQueryWrapper(
//                Condition.getQueryWrapper(new IamAuditRectify()), entityList
//        );
//        TokenSearch<IamAuditRectify> tokenSearch = new TokenSearch<>();
//		tokenSearch.addTokenQuery(queryWrapper, query);
//        IPage<IamAuditRectify> pages = rectifyService.page(Condition.getPage(query), queryWrapper);
//        ListResult<IamAuditRectifyVO> listResult = new ListResult<>(CommonCode.SUCCESS);
//        listResult.setList(rectifyWrapper.entityToVO(pages.getRecords()));
//        listResult.setTotal(Long.valueOf(pages.getTotal()).intValue());
//        return listResult;
//    }
//
//    /**
//     * 删除
//     */
//    @ApiOperation(value = "删除", notes = "删除")
//    @ApiResponses({
//            @ApiResponse(code = 200, message = "操作成功"),
//            @ApiResponse(code = 500, message = "服务器错误"),
//    })
//    @Transactional(rollbackFor = Throwable.class)
//    @PostMapping("/remove")
//    public R remove(@RequestBody IamAuditRectifyVO auditRectifyVO) {
//        List<Long> ids = auditRectifyVO.getIds();
//        return R.status(rectifyService.deleteLogic(Func.toLongList(StringUtils.join(ids, StringPool.COMMA))));
//    }
//
//}
//
